package com.wswy.wzcx.api;

import com.che.libcommon.api.BaseResult;

/**
 * Created by wangduheng26 on 2018/1/23.
 * wangduheng26@gmail.com
 */

public class ErrorCode {
    public static final int ERROR_PHONE_NOT_EXITE = 104013;

    public static final int ERROR_PHONE_NOT_SET_PWD = 104012;

    public static final int ERROR_TOKEN_ERROR = 102000;

    public static final int ERROR_CAR_INFO = 103010; //车架号或发动机号错误


    public static boolean isTokenInvalid(int code){
        return code == ERROR_TOKEN_ERROR;
    }

    public static boolean isTokenInvalid(BaseResult result){
        if(result == null){
            return false;
        }
        return isTokenInvalid(result.statusCode);
    }
}
